<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>教师列表</title>
</head>
<body>
<h1>教师列表</h1>
<table border="1">
    <tr><th>姓名</th><th>专业</th><th>操作</th></tr>
    <tr th:each="teacher : ${teachers}">
        <td th:text="${teacher.name}"></td>
        <td th:text="${teacher.major}"></td>
        <td><a th:href="@{/assignStudents(id=${teacher.id})}">分配学生</a></td>
    </tr>
</table>
<br>
<a href="/newTeacher">新增教师</a><br>
<a href="/newStudent">新增学生</a><br>
</body>
</html>